<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body style="display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh">
    <div>
        <span>登录成功</span>
        <br>
        <img src="" id="avatar" style="width: 75px; height: 75px;border-radius: 50px;display: block;">
        <span id="name"></span>
        <br>
        <span id="age"></span>
        <br>
        <span id="strengths"></span>
    </div>
    <script>
        const user = JSON.parse(localStorage.getItem('obj'))
        console.log(user)
        const name = document.getElementById('name')
        const age = document.getElementById('age')
        const strengths = document.getElementById('strengths')
        name.innerText = '姓名；' + user.name
        age.innerText = '年龄；' + user.age
        strengths.innerText = '特长；' + user.strengths
        avatar.src = user.avatar
    </script>
</body>

</html>